<html>
<head>
<title>register.ets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.s0 { color: #808080;}
.s1 { color: #a9b7c6;}
.s2 { color: #faa23d;}
.s3 { color: #aa7dfc;}
.s4 { color: #e2da90;}
.s5 { color: #bbb529;}
.s6 { color: #b3e54c;}
.s7 { color: #db7e9b;}
</style>
</head>
<body bgcolor="#2b2b2b">
<table CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#606060" >
<tr><td><center>
<font face="Arial, Helvetica" color="#000000">
register.ets</font>
</center></td></tr></table>
<pre><span class="s0">/*登录/注册*/</span>
<span class="s1">import </span><span class="s2">{ </span><span class="s1">http </span><span class="s2">} </span><span class="s1">from </span><span class="s3">'@kit.NetworkKit'</span><span class="s4">;</span>
<span class="s1">import </span><span class="s2">{ </span><span class="s1">BusinessError </span><span class="s2">} </span><span class="s1">from </span><span class="s3">'@kit.BasicServicesKit'</span><span class="s4">;</span>
<span class="s1">import </span><span class="s2">{ </span><span class="s1">R </span><span class="s2">} </span><span class="s1">from </span><span class="s3">'../entity/R'</span><span class="s4">;</span>
<span class="s1">import </span><span class="s2">{ </span><span class="s1">User </span><span class="s2">} </span><span class="s1">from </span><span class="s3">'../entity/User'</span><span class="s4">;</span>

<span class="s5">@</span><span class="s1">Entry</span>
<span class="s5">@</span><span class="s1">Component</span>
<span class="s1">struct register</span><span class="s2">{</span>
  <span class="s5">@</span><span class="s1">Consume</span>
  <span class="s1">stackPath</span><span class="s4">: </span><span class="s1">NavPathStack</span>
  <span class="s5">@</span><span class="s1">State buttonText</span><span class="s4">:</span><span class="s1">string</span><span class="s4">=</span><span class="s3">&quot;获取验证码&quot;</span>
  <span class="s5">@</span><span class="s1">State phone</span><span class="s4">:</span><span class="s1">string</span><span class="s4">=</span><span class="s3">'13260589765'</span>
  <span class="s5">@</span><span class="s1">State code</span><span class="s4">:</span><span class="s1">string</span><span class="s4">=</span><span class="s3">''</span>
  <span class="s5">@</span><span class="s1">State isSending</span><span class="s4">: </span><span class="s1">boolean </span><span class="s4">= </span><span class="s1">false</span><span class="s4">;</span>
  <span class="s5">@</span><span class="s1">State isAgreed</span><span class="s4">: </span><span class="s1">boolean </span><span class="s4">= </span><span class="s1">false</span><span class="s4">;</span>
  <span class="s5">@</span><span class="s1">State countdown</span><span class="s4">: </span><span class="s1">number </span><span class="s4">= </span><span class="s6">0</span><span class="s4">;</span>
  <span class="s1">private showToast</span><span class="s7">(</span><span class="s1">message</span><span class="s4">: </span><span class="s1">string</span><span class="s7">) </span><span class="s2">{</span>
    <span class="s1">this</span><span class="s4">.</span><span class="s1">getUIContext</span><span class="s7">()</span><span class="s4">.</span><span class="s1">getPromptAction</span><span class="s7">()</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s2">{</span>
      <span class="s1">message</span><span class="s4">: </span><span class="s1">message</span><span class="s4">,</span>
      <span class="s1">duration</span><span class="s4">: </span><span class="s6">2000</span>
    <span class="s2">}</span><span class="s7">)</span><span class="s4">;</span>
  <span class="s2">}</span>
  <span class="s1">sendVerifyCode</span><span class="s7">() </span><span class="s2">{</span>
    <span class="s1">let request</span><span class="s4">=</span><span class="s1">http</span><span class="s4">.</span><span class="s1">createHttp</span><span class="s7">()</span><span class="s4">;</span>
    <span class="s1">request</span><span class="s4">.</span><span class="s1">request</span><span class="s7">(</span><span class="s3">&quot;http://192.168.50.1:8081/user/send?phone=&quot; </span><span class="s4">+</span><span class="s1">this</span><span class="s4">.</span><span class="s1">phone</span><span class="s4">,</span>
      <span class="s7">(</span><span class="s1">err</span><span class="s4">: </span><span class="s1">BusinessError</span><span class="s4">, </span><span class="s1">data</span><span class="s4">: </span><span class="s1">http</span><span class="s4">.</span><span class="s1">HttpResponse</span><span class="s7">) </span><span class="s4">=&gt; </span><span class="s2">{</span>
        <span class="s1">if</span><span class="s7">(</span><span class="s4">!</span><span class="s1">err</span><span class="s7">)</span><span class="s2">{</span>
          <span class="s1">this</span><span class="s4">.</span><span class="s1">getUIContext</span><span class="s7">()</span><span class="s4">.</span><span class="s1">getPromptAction</span><span class="s7">()</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s2">{</span>
            <span class="s1">message</span><span class="s4">:</span><span class="s3">&quot;发送成功&quot;</span>
          <span class="s2">}</span><span class="s7">)</span>
        <span class="s2">}</span><span class="s1">else </span><span class="s2">{}</span>
      <span class="s2">}</span><span class="s7">)</span>
    <span class="s1">this</span><span class="s4">.</span><span class="s1">isSending </span><span class="s4">= </span><span class="s1">true</span><span class="s4">;</span>
    <span class="s1">this</span><span class="s4">.</span><span class="s1">countdown </span><span class="s4">= </span><span class="s6">60</span><span class="s4">;</span>
    <span class="s1">this</span><span class="s4">.</span><span class="s1">buttonText </span><span class="s4">= </span><span class="s3">`重新发送(</span><span class="s2">${</span><span class="s1">this</span><span class="s4">.</span><span class="s1">countdown</span><span class="s2">}</span><span class="s3">)`</span><span class="s4">;</span>
    <span class="s1">const timer </span><span class="s4">= </span><span class="s1">setInterval</span><span class="s7">(() </span><span class="s4">=&gt; </span><span class="s2">{</span>
      <span class="s1">this</span><span class="s4">.</span><span class="s1">countdown</span><span class="s4">--;</span>
      <span class="s1">this</span><span class="s4">.</span><span class="s1">buttonText </span><span class="s4">= </span><span class="s3">`重新发送(</span><span class="s2">${</span><span class="s1">this</span><span class="s4">.</span><span class="s1">countdown</span><span class="s2">}</span><span class="s3">)`</span><span class="s4">;</span>
      <span class="s1">if </span><span class="s7">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">countdown </span><span class="s4">&lt;= </span><span class="s6">0</span><span class="s7">) </span><span class="s2">{</span>
        <span class="s1">clearInterval</span><span class="s7">(</span><span class="s1">timer</span><span class="s7">)</span><span class="s4">;</span>
        <span class="s1">this</span><span class="s4">.</span><span class="s1">isSending </span><span class="s4">= </span><span class="s1">false</span><span class="s4">;</span>
        <span class="s1">this</span><span class="s4">.</span><span class="s1">buttonText </span><span class="s4">= </span><span class="s3">'获取验证码'</span><span class="s4">;</span>
      <span class="s2">}</span>
    <span class="s2">}</span><span class="s4">, </span><span class="s6">1000</span><span class="s7">)</span><span class="s4">;</span>
  <span class="s2">}</span>
  <span class="s1">handleLogin</span><span class="s7">()</span><span class="s2">{</span>
    <span class="s1">if </span><span class="s7">(</span><span class="s4">!</span><span class="s1">this</span><span class="s4">.</span><span class="s1">isAgreed</span><span class="s7">) </span><span class="s2">{</span>
      <span class="s1">this</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s3">&quot;请同意用户协议和隐私政策&quot;</span><span class="s7">)</span><span class="s4">;</span>
      <span class="s1">return</span><span class="s4">;</span>
    <span class="s2">}</span>
    <span class="s1">let request</span><span class="s4">=</span><span class="s1">http</span><span class="s4">.</span><span class="s1">createHttp</span><span class="s7">()</span><span class="s4">;</span>
    <span class="s1">request</span><span class="s4">.</span><span class="s1">request</span><span class="s7">(</span><span class="s3">&quot;http://192.168.50.1:8081/user/login&quot;</span><span class="s4">,</span>
      <span class="s2">{</span><span class="s3">&quot;method&quot;</span><span class="s4">: </span><span class="s1">http</span><span class="s4">.</span><span class="s1">RequestMethod</span><span class="s4">.</span><span class="s1">POST</span><span class="s4">,</span>
        <span class="s1">header</span><span class="s4">: </span><span class="s2">{ </span><span class="s3">&quot;Content-Type&quot;</span><span class="s4">: </span><span class="s3">&quot;application/json&quot; </span><span class="s2">}</span><span class="s4">,</span>
        <span class="s1">extraData</span><span class="s4">: </span><span class="s2">{</span>
          <span class="s1">phone</span><span class="s4">: </span><span class="s1">this</span><span class="s4">.</span><span class="s1">phone</span><span class="s4">,</span>
          <span class="s1">code</span><span class="s4">: </span><span class="s1">this</span><span class="s4">.</span><span class="s1">code</span>
        <span class="s2">}}</span><span class="s4">,</span>
      <span class="s7">(</span><span class="s1">err</span><span class="s4">: </span><span class="s1">BusinessError</span><span class="s4">, </span><span class="s1">data</span><span class="s4">: </span><span class="s1">http</span><span class="s4">.</span><span class="s1">HttpResponse</span><span class="s7">) </span><span class="s4">=&gt; </span><span class="s2">{</span>
        <span class="s1">if</span><span class="s7">(</span><span class="s4">!</span><span class="s1">err</span><span class="s7">) </span><span class="s2">{</span>
          <span class="s1">let result</span><span class="s4">: </span><span class="s1">R</span><span class="s4">&lt;</span><span class="s1">User</span><span class="s4">&gt; = </span><span class="s1">JSON</span><span class="s4">.</span><span class="s1">parse</span><span class="s7">(</span><span class="s1">data</span><span class="s4">.</span><span class="s1">result</span><span class="s4">.</span><span class="s1">toString</span><span class="s7">()) </span><span class="s1">as R</span><span class="s4">&lt;</span><span class="s1">User</span><span class="s4">&gt;</span>
          <span class="s1">if </span><span class="s7">(</span><span class="s1">result</span><span class="s4">.</span><span class="s1">code </span><span class="s4">== </span><span class="s6">200</span><span class="s7">) </span><span class="s2">{</span>
            <span class="s1">AppStorage</span><span class="s4">.</span><span class="s1">setOrCreate</span><span class="s7">(</span><span class="s3">&quot;token&quot;</span><span class="s4">,</span><span class="s1">result</span><span class="s4">.</span><span class="s1">data</span><span class="s7">)</span>
            <span class="s1">if </span><span class="s7">(</span><span class="s1">result</span><span class="s4">.</span><span class="s1">data</span><span class="s7">) </span><span class="s2">{</span>
              <span class="s1">this</span><span class="s4">.</span><span class="s1">getUIContext</span><span class="s7">()</span><span class="s4">.</span><span class="s1">getPromptAction</span><span class="s7">()</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s2">{</span>
                <span class="s1">message</span><span class="s4">: </span><span class="s3">&quot;登录成功&quot;</span>
              <span class="s2">}</span><span class="s7">)</span>
          <span class="s1">this</span><span class="s4">.</span><span class="s1">stackPath</span><span class="s4">.</span><span class="s1">pushPathByName</span><span class="s7">(</span><span class="s3">&quot;user&quot;</span><span class="s4">, </span><span class="s1">undefined</span><span class="s7">)</span>
            <span class="s2">}</span>
          <span class="s2">}</span><span class="s1">else </span><span class="s2">{</span>
            <span class="s1">this</span><span class="s4">.</span><span class="s1">getUIContext</span><span class="s7">()</span><span class="s4">.</span><span class="s1">getPromptAction</span><span class="s7">()</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s2">{</span>
              <span class="s1">message</span><span class="s4">: </span><span class="s3">&quot;登录失败&quot;</span>
            <span class="s2">}</span><span class="s7">)</span>
          <span class="s2">}</span>
        <span class="s2">}</span>
      <span class="s2">}</span><span class="s7">)</span>
  <span class="s2">}</span>
  <span class="s1">build</span><span class="s7">() </span><span class="s2">{</span>
    <span class="s1">NavDestination</span><span class="s7">()</span><span class="s2">{</span>
      <span class="s1">Column</span><span class="s7">() </span><span class="s2">{</span>
        <span class="s1">Column</span><span class="s7">() </span><span class="s2">{</span>
          <span class="s1">Column</span><span class="s7">()</span><span class="s2">{</span>
            <span class="s1">Column</span><span class="s7">() </span><span class="s2">{</span>
              <span class="s1">Image</span><span class="s7">(</span><span class="s1">$r</span><span class="s7">(</span><span class="s3">'app.media.dy_logo'</span><span class="s7">))</span>
                <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s6">100</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">100</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">top</span><span class="s4">: </span><span class="s6">40</span><span class="s4">, </span><span class="s1">bottom</span><span class="s4">: </span><span class="s6">15 </span><span class="s2">}</span><span class="s7">)</span>

              <span class="s1">Text</span><span class="s7">(</span><span class="s3">'抖音'</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">28</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontWeight</span><span class="s7">(</span><span class="s1">FontWeight</span><span class="s4">.</span><span class="s1">Bold</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'#386BFF'</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">bottom</span><span class="s4">: </span><span class="s6">40 </span><span class="s2">}</span><span class="s7">)</span>
            <span class="s2">}</span>
            <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'100%'</span><span class="s7">)</span>
          <span class="s2">}</span>
          <span class="s1">Row</span><span class="s7">() </span><span class="s2">{</span>
            <span class="s1">Button</span><span class="s7">(</span><span class="s3">'+86 |'</span><span class="s4">,</span><span class="s2">{ </span><span class="s1">type</span><span class="s4">: </span><span class="s1">ButtonType</span><span class="s4">.</span><span class="s1">Normal </span><span class="s2">}</span><span class="s7">)</span><span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s3">'#F5F5F5'</span><span class="s7">)</span><span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'black'</span><span class="s7">)</span><span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
            <span class="s1">TextInput</span><span class="s7">(</span><span class="s2">{</span>
              <span class="s1">placeholder</span><span class="s4">: </span><span class="s3">'请输入电话号码'</span><span class="s4">,</span>
              <span class="s1">text</span><span class="s4">: </span><span class="s1">this</span><span class="s4">.</span><span class="s1">phone</span>
            <span class="s2">}</span><span class="s7">)</span><span class="s4">.</span><span class="s1">onChange</span><span class="s7">(</span><span class="s1">value</span><span class="s4">=&gt;</span><span class="s1">this</span><span class="s4">.</span><span class="s1">phone</span><span class="s4">=</span><span class="s1">value</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'80%'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">16</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">borderRadius</span><span class="s7">(</span><span class="s6">0</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s3">'#F5F5F5'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">padding</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">left</span><span class="s4">: </span><span class="s6">10 </span><span class="s2">}</span><span class="s7">)</span>
          <span class="s2">}</span>
          <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'90%'</span><span class="s7">)</span>
          <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
          <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">bottom</span><span class="s4">: </span><span class="s6">20 </span><span class="s2">}</span><span class="s7">)</span>
          <span class="s1">Row</span><span class="s7">() </span><span class="s2">{</span>
            <span class="s1">TextInput</span><span class="s7">(</span><span class="s2">{</span>
              <span class="s1">placeholder</span><span class="s4">: </span><span class="s3">'请输入验证码'</span><span class="s4">,</span>
              <span class="s1">text</span><span class="s4">: </span><span class="s1">this</span><span class="s4">.</span><span class="s1">code</span>
            <span class="s2">}</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">onChange</span><span class="s7">(</span><span class="s1">value </span><span class="s4">=&gt; </span><span class="s2">{</span>
                <span class="s1">this</span><span class="s4">.</span><span class="s1">code </span><span class="s4">= </span><span class="s1">value</span><span class="s4">;</span>
              <span class="s2">}</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">borderRadius</span><span class="s7">(</span><span class="s6">0</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'65%'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">16</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s3">'#F5F5F5'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">padding</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">left</span><span class="s4">: </span><span class="s6">10 </span><span class="s2">}</span><span class="s7">)</span>
            <span class="s1">Button</span><span class="s7">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">buttonText</span><span class="s4">,</span><span class="s2">{ </span><span class="s1">type</span><span class="s4">: </span><span class="s1">ButtonType</span><span class="s4">.</span><span class="s1">Normal </span><span class="s2">}</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'35%'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">12</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">isSending </span><span class="s4">? </span><span class="s3">'#CCCCCC' </span><span class="s4">: </span><span class="s3">'#FF6B3B'</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s1">Color</span><span class="s4">.</span><span class="s1">White</span><span class="s7">)</span>
              <span class="s4">.</span><span class="s1">onClick</span><span class="s7">(() </span><span class="s4">=&gt; </span><span class="s2">{</span>
                <span class="s1">if </span><span class="s7">(</span><span class="s4">!</span><span class="s1">this</span><span class="s4">.</span><span class="s1">isSending</span><span class="s7">) </span><span class="s2">{</span>
                  <span class="s1">this</span><span class="s4">.</span><span class="s1">sendVerifyCode</span><span class="s7">()</span><span class="s4">;</span>
                <span class="s2">}</span>
              <span class="s2">}</span><span class="s7">)</span>
          <span class="s2">}</span>
          <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'90%'</span><span class="s7">)</span>
          <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
          <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">bottom</span><span class="s4">: </span><span class="s6">30 </span><span class="s2">}</span><span class="s7">)</span>
          <span class="s1">Button</span><span class="s7">(</span><span class="s3">'验证并登录'</span><span class="s4">,</span><span class="s2">{ </span><span class="s1">type</span><span class="s4">: </span><span class="s1">ButtonType</span><span class="s4">.</span><span class="s1">Normal </span><span class="s2">}</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'90%'</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">50</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">18</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s1">Color</span><span class="s4">.</span><span class="s1">White</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s3">'red'</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">onClick</span><span class="s7">(() </span><span class="s4">=&gt; </span><span class="s2">{</span>
              <span class="s1">this</span><span class="s4">.</span><span class="s1">handleLogin</span><span class="s7">()</span>
            <span class="s2">}</span><span class="s7">)</span>
          <span class="s1">Column</span><span class="s7">()</span><span class="s2">{</span>
            <span class="s1">Row</span><span class="s7">() </span><span class="s2">{</span>
              <span class="s1">Checkbox</span><span class="s7">()</span>
                <span class="s4">.</span><span class="s1">select</span><span class="s7">(</span><span class="s1">this</span><span class="s4">.</span><span class="s1">isAgreed</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s6">14</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s6">14</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">onChange</span><span class="s7">(</span><span class="s1">checked </span><span class="s4">=&gt; </span><span class="s2">{</span>
                  <span class="s1">this</span><span class="s4">.</span><span class="s1">isAgreed </span><span class="s4">= </span><span class="s1">checked</span><span class="s4">;</span>
                <span class="s2">}</span><span class="s7">)</span>

              <span class="s1">Text</span><span class="s7">(</span><span class="s3">&quot;我已阅读并同意&quot;</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">12</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'#888888'</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">left</span><span class="s4">: </span><span class="s6">5 </span><span class="s2">}</span><span class="s7">)</span>

              <span class="s1">Text</span><span class="s7">(</span><span class="s3">&quot;《用户协议》&quot;</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">12</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'#386BFF'</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">onClick</span><span class="s7">(() </span><span class="s4">=&gt; </span><span class="s1">this</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s3">&quot;查看用户协议&quot;</span><span class="s7">))</span>

              <span class="s1">Text</span><span class="s7">(</span><span class="s3">&quot;和&quot;</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">12</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'#888888'</span><span class="s7">)</span>

              <span class="s1">Text</span><span class="s7">(</span><span class="s3">&quot;《隐私政策》&quot;</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontSize</span><span class="s7">(</span><span class="s6">12</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">fontColor</span><span class="s7">(</span><span class="s3">'#386BFF'</span><span class="s7">)</span>
                <span class="s4">.</span><span class="s1">onClick</span><span class="s7">(() </span><span class="s4">=&gt; </span><span class="s1">this</span><span class="s4">.</span><span class="s1">showToast</span><span class="s7">(</span><span class="s3">&quot;查看隐私政策&quot;</span><span class="s7">))</span>
            <span class="s2">}</span>
            <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'100%'</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">justifyContent</span><span class="s7">(</span><span class="s1">FlexAlign</span><span class="s4">.</span><span class="s1">Center</span><span class="s7">)</span>
            <span class="s4">.</span><span class="s1">margin</span><span class="s7">(</span><span class="s2">{ </span><span class="s1">top</span><span class="s4">: </span><span class="s6">20</span><span class="s4">, </span><span class="s1">bottom</span><span class="s4">: </span><span class="s6">30 </span><span class="s2">}</span><span class="s7">)</span>
          <span class="s2">}</span>
        <span class="s2">}</span>
        <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'100%'</span><span class="s7">)</span>
        <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s3">&quot;100%&quot;</span><span class="s7">)</span>
        <span class="s4">.</span><span class="s1">justifyContent</span><span class="s7">(</span><span class="s1">FlexAlign</span><span class="s4">.</span><span class="s1">Start</span><span class="s7">)</span>
      <span class="s2">}</span>
      <span class="s4">.</span><span class="s1">width</span><span class="s7">(</span><span class="s3">'100%'</span><span class="s7">)</span>
      <span class="s4">.</span><span class="s1">height</span><span class="s7">(</span><span class="s3">'100%'</span><span class="s7">)</span>
      <span class="s4">.</span><span class="s1">backgroundColor</span><span class="s7">(</span><span class="s3">'#FFFFFF'</span><span class="s7">)</span>
      <span class="s4">.</span><span class="s1">alignItems</span><span class="s7">(</span><span class="s1">HorizontalAlign</span><span class="s4">.</span><span class="s1">Start</span><span class="s7">)</span>
    <span class="s2">}</span><span class="s4">.</span><span class="s1">hideTitleBar</span><span class="s7">(</span><span class="s1">true</span><span class="s7">)</span>
  <span class="s2">}</span>
<span class="s2">}</span>
<span class="s5">@</span><span class="s1">Builder</span>
<span class="s1">function buildregister</span><span class="s7">()</span><span class="s2">{</span>
  <span class="s1">register</span><span class="s7">()</span>
<span class="s2">}</span></pre>
</body>
</html>